<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Return class probabilities for previous unseen data</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="svmmodel.load.html">SVMModel::load</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="svmmodel.predict.html">SVMModel::predict</a></div>
 <div class="up"><a href="class.svmmodel.html">SVMModel</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="svmmodel.predict-probability" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SVMModel::predict_probability</h1>
  <p class="verinfo">(PECL svm &gt;= 0.1.4)</p><p class="refpurpose"><span class="refname">SVMModel::predict_probability</span> &mdash; <span class="dc-title">Return class probabilities for previous unseen data</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-svmmodel.predict-probability-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">float</span> <span class="methodname"><strong>SVMModel::predict_probability</strong></span>
    ( <span class="methodparam"><span class="type">array</span> <code class="parameter">$data</code></span>
   )</div>

  <p class="para rdfs-comment">
   This function accepts an array of data and attempts to predict the class, as with the predict function.
   Additionally, however, this function returns an array of probabilities, one per class in the model, which
   represent the estimated chance of the data supplied being a member of that class. Requires that the model
   to be used has been trained with the probability parameter set to true.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-svmmodel.predict-probability-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">data</code></em></dt>

     <dd>

      <p class="para">
       The array to be classified. This should be a series of key =&gt; value 
       pairs in increasing key order, but not necessarily continuous. 
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">probabilities</code></em></dt>

     <dd>

      <p class="para">
       The supplied value will be filled with the probabilities. This will be either null, in the case 
       of a model without probability information, or an array where the index is the class name and the value
       the predicted probability. 
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-svmmodel.predict-probability-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Float the predicted value. This will be a class label in the case of 
   classification, a real value in the case of regression.
   Throws SVMException on error
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-svmmodel.predict-probability-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="methodname"><strong>SVM::predict()</strong></span></li>
   </ul>
  </p>
 </div>



</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="svmmodel.load.html">SVMModel::load</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="svmmodel.predict.html">SVMModel::predict</a></div>
 <div class="up"><a href="class.svmmodel.html">SVMModel</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
